import org.eclipse.paho.client.mqttv3.MqttException;

import com.google.gson.Gson;

public class GsonTest {

	public static void main(String[] args) {

		Thread t2 = new Thread(new Runnable() {
			@Override
			public void run() {
				InputVO obj2 = new InputVO();
				obj2.setAction("subscribe");
				obj2.setClientId("hongdi");
				obj2.setTopic("dole.dev7@gmail.com");
				Gson gson2 = new Gson();
				String json2 = gson2.toJson(obj2);
				try {
					Node n = new Node(json2);
				} catch (MqttException e) {
					e.printStackTrace();
				}
			}
		});
		t2.start();

		Thread t = new Thread(new Runnable() {
			@Override
			public void run() {
				InputVO obj = new InputVO();
				obj.setAction("publish");
				obj.setClientId("chodi");
				obj.setTopic("dole.dev7@gmail.com");
				Gson gson = new Gson();
				String json = gson.toJson(obj);
				try {
					Node n = new Node(json);
				} catch (MqttException e) {
					e.printStackTrace();
				}
			}
		});
			//t.start();
		

	}

}
